home *** CD-ROM | disk | FTP | other *** search
- ºplaywave.scpºLet "w", "{_WindowsDir}\xylophon.wav"
- FileExist "e", "{w}"
- If "{e}" = "0"
- PathBox "w", "Please choose the WAVE file which should be played.", "", "{_WindowsDir}", "", "*.wav"
- If "{w}" = ""
- OutBox "No problem..."
- End
- EndIf
- EndIf
- PlayWave "{w}"
- If "{_err}" = "0"
- OutBox "You hear the file '{w}'."
- Else
- OutBox "Sorry, it isn't possible to play '{w}'."
- EndIf
- ºreboot.scpºMsgBox "i", "Do you want to restart Windows?", "", "&Yes;&No"
- If "{i}" = "1"
- ReBoot
- Else
- OutBox "No problem..."
- EndIf
- ºregbaser.scpºRegBaseRead "res1", ".FSC"
- RegBaseRead "res2", "{res1}"
- OutBox "The document with file extension {res1}{_NL} is named:{_NL}{res2}", "Document name"
- ºregbasew.scpºLet "k", "ShihTaoGame"
- RegBaseWrite ".GAM", "{k}"
- RegBaseWrite "{k}", "Shih Tao game file"
- RegBaseWrite "{k}\shell\open\command", "{_BootDrv}\ShihTao\ShihTao.Exe"
- RegBaseWrite "{k}\shell\open\ddeexec", "open %1"
- RegBaseWrite "{k}\shell\open\ddeexec\topic", "system"
- ºrem.scpºRem This is a comment.
- Rem This is also a comment.
- 'This is a comment too.
- Let "t", "This example demonstrates comments"
- 'OutBox "{t}", "result" 'In this line nothing 'comes
- OutBox "{t}", "result" 'This is a comment too.
- ºresstrgr.scpºResStringRead "r", "{_SystemDir}\commdlg.dll", "259"
- If "{_Err}" = "0"
- OutBox "The 259th resource string of file COMMDLG.DLL is:{_NL}{r}"
- EndIf
- ºrmdir.scpºLet "Dir", "{_BootDrv}\stepone.tst"
- MkDir "{Dir}"
- If "{_Err}" = "0"
- OutBox "{Dir} was created and will now be deleted."
- RmDir "{Dir}"
- EndIf
- ºsendkeys.scpºSendKeys "%?B"
- ºsetattri.scpºPathBox "f", "Please enter the file you want to change the archive attribute.", "", "", "", "", "-1"
- If "{f}" = ""
- OutBox "No problem..."
- End
- EndIf
- IsArchive "h", "{f}"
- SetArchive "{f}", "{h}"
- Let "t", "Archive bit was "
- If "{h}" = "0"
- Let "w", "set."
- Let "h", "-1"
- Else
- Let "w", "deleted."
- EndIf
- Concat "t", "{w}.{_NL}Should it be reset?"
- MsgBox "i", "{t}", "", "&Yes;&No"
- If "{i}" = "1"
- SetArchive "{f}", "{h}"
- EndIf
- ºsetwallp.scpºIniRead "OldWallpaper", "", "Desctop", "Wallpaper"
- IniRead "path", "win.ini", "krs", "StepOnePath"
- SetWallpaper "{path}\samples\install1.bmp"
- MsgBox "res", "Should it be undone{_nl}or should this file be the wallpaper{_nl}or don't you want to have a wallpaper?", "", "&Undo;&Use;&Delete"
- If "{res}" = "1"
- SetWallpaper "{OldWallpaper}"
- EndIf
- If "{res}" = "3"
- SetWallPaper "{_nil}"
- EndIf
- ºsetwinp.scpºTextRead "tx", "setwinp1.txt"
- Window "-1", "SetWindowPosition", "Info", "{tx}", "-1", "0;0;1000;666"
- GetUserInput "Continue"
- TaskStart "WinHelp"
- SetWindowPosition "winhelp.exe", "0;667;1000;1000"
- GetUserInput "End"
- ºsplit.scpºLet "res", "Hello world, how are you?"
- Split "res", "{res}", " ", "3"
- 'Returns 'how'
- OutBox "{res}", "Result"
- ºsplitpat.scpºSplitPathName "res", "d:\krs\stepone\manual\man.sam", "3"
- 'Returns 'man'
- OutBox "{res}", "Result"
- ºsub.scpºGoSub "test", "abc"
- End
-
- Sub test
- Parameter "x"
- OutBox "{test:x}"
- EndSub
- ºsysconst.scpºOutBox "Windows version is: {_WindowsVersion}.", "System"
- ºtable.scpºLet "tx", "{Test[1;1]}"
- Concat "tx", " {Test[1;2]}"
- Let "Test[1;3]", "!"
- Concat "tx", "{Test[1;3]}"
- OutBox "{tx}", "Table demonstration"
- ºtaskstop.scpºLet "prg", "Write.Exe"
- Window "-1", "StepOne-Test", "Info", "Press 'Continue' to close '{prg}'.", "-1", "10;10;990;900"
- GetUserInput "Continue"
- TaskStop "{prg}"
- ºtaskstrt.scpºLet "prg", "Write.Exe"
- Window "-1", "StepOne-Test", "Info", "Press 'Continue' to start '{prg}'.", "-1", "10;10;990;900"
- GetUserInput "Continue"
- TaskStart "{prg}"
- If "{_Err}" = "-1"
- Window "-1", "", "Error", "'{prg}' couldn't be started."
- Else
- Window "-1", "", "Success", "'{prg}' was started."
- EndIf
- GetUserInput "End"
- ºtextread.scpºTextRead "res", "{_BootDrv}\AUTOEXEC.BAT", "-1"
- OutBox "{res}", "AUTOEXEC.BAT"
- ºtextwrit.scpºTextRead "res", "{_BootDrv}\AUTOEXEC.BAT", "-1"
- TextWrite "textwrit.tmp", "{res}", "", "-1"
- OutBox "textwrit.tmp", "AUTOEXEC.BAT as TEXTWRIT.TMP."
- ºtouch.scpº' Changes the date of file 'TOUCH.FSC' to the given date.
- ' Warning: The new file date isn't immediately accessable.
- ' Windows File Manager needs i.e. a refresh to reread the directory.
- Touch "{_appname}", "1/1/1994", "0:0:0"ºvariable.scpºLet "prg", "MyProg"
- Let "prgpath", "{_BootDrv}\{Prg}"
- OutBox "{prg} will be installed in path {prgpath}."
- ºcompare.scpºIf "{_TempDir}" =: "{_WindowsDir}"
- Let "t", "Your TEMP directory isn't on the same drive as your Windows directory."
- Else
- Let "t", "Your TEMP directory is on the same drive as your Windows directory."
- EndIf
- OutBox "{t}"
- ºverinfor.scpºLet "f", "{_WindowsDir}\write.exe"
- VersionInfoRead "res", "{f}", "FileDescription"
- OutBox "{res}", "Copyright of MS Write"
- ºwait.scpºAskBox "t", "How many seconds should StepOne wait?"
- If "{t}" <> ""
- Compute "", "{t}" + "2"
- If "{_Err}" = "0"
- Wait "+{t}"
- OutBox "StepOne has waited for {t} seconds."
- Else
- OutBox "You haven't entered a digit."
- EndIf
- EndIf
- ºwindow.scpºLet "t", "StepOne test"
- Window "-1", "{t}", "Info", "Press 'End' to end '{t}'.", "-1", "10;10;990;900"
- GetUserInput "&End"
- ºwinhelp.scpºOutBox "StepOne starts now the help system of Windows."
- WinHelp "{_WindowsDir}\winhelp.hlp"
- ºgettabc.tabºTable Test
- EndTable
- ºgettabec.tabºTable Test
- "Test1", "Test2"
- EndTable
- ºgettablc.tabºTable Test
- "Test1", "Test2"
- ""
- EndTable
- ºtable.tabºTable Test
- "Hello", "World", ""
- EndTable
-